package com.borqsprocessmanager.receiver;

import android.content.Context;
import android.media.AudioManager;

import com.borqsprocessmanager.BatteryManagerService.IStateReceiver;
import com.borqsprocessmanager.util.Log;

public class AudioChangedReceiver implements IStateReceiver {
    private final String TAG = "AudioChangedReceiver";

    private AudioManager am;

    public AudioChangedReceiver(Context context) {
        am = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE);
    }

    @Override
    public boolean getState() {
        Log.v(TAG, "am.isMusicActive()===" + am.isMusicActive());
        return !am.isMusicActive();
    }

    @Override
    public void initState() {
        // TODO Auto-generated method stub

    }

}
